HAL PLAY secure attributes settings functions migration ¶
This section provides information about the HAL PLAY secure attributes settings operation functions migration.
HAL PLAY configure security and privilege attributes function ¶
In HAL1, the function
HAL_PLAY_ConfigAttributes()
is used to configure security and privilege attributes of PLAY.
In HAL2, this functionality is split into two distinct functions to separately set the security and privilege attributes as follows:
HAL_PLAY_SetSecAttr()to set the security attribute.HAL_PLAY_SetPrivAttr()to set the privilege attribute.
For more details, see also updates between HAL1 and HAL2 regarding the security and privilege attributes parameters.
|
HAL1 |
HAL2 |
|
|---|---|---|
|
Function prototype |
HAL_PLAY_ConfigAttributes(HAL_PLAY_HandleTypeDef *hplay,
const HAL_PLAY_AccessControlConfTypeDef *p_config)
|
HAL_PLAY_SetSecAttr(hal_play_t instance, uint32_t item,
hal_play_sec_attr_t sec_attr)
HAL_PLAY_SetPrivAttr(hal_play_t instance, uint32_t item,
hal_play_priv_attr_t priv_attr)
|
|
Example usage |
HAL_PLAY_HandleTypeDef hplay;
HAL_PLAY_AccessControlConfTypeDef attr_cfg = {HAL_PLAY_TZ_CONFIG_REG_PROTECTED,
HAL_PLAY_TZ_CONFIG_REG_PROTECTED};
HAL_PLAY_ConfigAttributes(&hplay, &attr_cfg);
|
HAL_PLAY_SetSecAttr(HAL_PLAY1, HAL_PLAY_SEC_ITEM_CONFIG, HAL_PLAY_SEC);
HAL_PLAY_SetPrivAttr(HAL_PLAY1, HAL_PLAY_PRIV_ITEM_CONFIG, HAL_PLAY_PRIV);
|
HAL PLAY get security and privilege attributes function ¶
In HAL1, the function
HAL_PLAY_GetConfigAttributes()
retrieves the security and privilege attributes of PLAY.
In HAL2, this functionality is split into two distinct functions to separately obtain the security and privilege attributes as follows:
HAL_PLAY_GetSecAttr()to get the security attribute.HAL_PLAY_GetPrivAttr()to get the privilege attribute.
For more details, see also updates between HAL1 and HAL2 regarding the security and privilege attributes parameters.
|
HAL1 |
HAL2 |
|
|---|---|---|
|
Function prototype |
HAL_PLAY_GetConfigAttributes(HAL_PLAY_HandleTypeDef *hplay,
HAL_PLAY_AccessControlConfTypeDef *p_config)
|
HAL_PLAY_GetSecAttr(hal_play_t instance, uint32_t item)
HAL_PLAY_GetPrivAttr(hal_play_t instance, uint32_t item)
|
|
Example usage |
HAL_PLAY_HandleTypeDef hplay;
HAL_PLAY_AccessControlConfTypeDef attr_cfg;
HAL_PLAY_GetConfigAttributes(&hplay, &attr_cfg);
|
hal_play_sec_attr_t sec_attr;
hal_play_priv_attr_t priv_attr;
sec_attr = HAL_PLAY_GetSecAttr(HAL_PLAY1, HAL_PLAY_SEC_ITEM_CONFIG);
priv_attr = HAL_PLAY_GetPrivAttr(HAL_PLAY1, HAL_PLAY_PRIV_ITEM_CONFIG);
|